// 引入menu列表接口
import {
    roleList
} from '../../../request/api'
const state = {
    roleList: []
}

const getters = {
    getroles(state) {
        return state.roleList
    }
}

const mutations = {
    setRoleList(state, plydata) {
        state.roleList = plydata
    }
}

const actions = {
    getRoleList({commit}){
        roleList().then(res => {
            console.log(res)
            commit('setRoleList', res.list)

        })
    }
}

export default {
    state,
    mutations,
    actions,
    getters,
    namespaced: true
}